﻿using System.Windows.Controls;
using System.Windows.Media;
using System;

namespace AllenalaMente.Games
{
    public partial class GameIntro : UserControl
    {
        public GameIntro()
        {
            InitializeComponent();
        }

        public void setDescriptionText(string description)
        {
            GameName.Text = description;

            descriptionImage.Height = 0;
        }

        public void setDescriptionText(string gameTitle, string description, string imagePath, string tutorialImagePath)
        {
            textBlocktutorial.Text = description;
            GameName.Text = gameTitle;

            descriptionImage.Height = 200;

            Uri uri = new Uri(imagePath, UriKind.RelativeOrAbsolute);
            ImageSource img = new System.Windows.Media.Imaging.BitmapImage(uri);
            GameIcon.SetValue(Image.SourceProperty, img);
         

            Uri uri2 = new Uri(tutorialImagePath, UriKind.RelativeOrAbsolute);
            ImageSource imgDesk = new System.Windows.Media.Imaging.BitmapImage(uri2);
            descriptionImage.SetValue(Image.SourceProperty, imgDesk);
            descriptionImage.Width = 420;
            descriptionImage.Height = 300;
        }
    }
}
